3.29 \(\int \frac{\text{sech}^2(x)}{a+b \cosh ^2(x)} \, dx\)

Optimal. Leaf size=38 \[ \frac{\tanh (x)}{a}-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}} \]

[Out]

-((b*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/(a^(3/2)*Sqrt[a + b])) + Tanh[x]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0789743, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3187, 453, 208} \[ \frac{\tanh (x)}{a}-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Sech[x]^2/(a + b*Cosh[x]^2),x]

[Out]

-((b*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/(a^(3/2)*Sqrt[a + b])) + Tanh[x]/a

Rule 3187

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*(a + (a + b)*ff^2*x^2)^p)/(1 + ff^2*x^2)^(m/2 + p
+ 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\text{sech}^2(x)}{a+b \cosh ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1-x^2}{x^2 \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac{\tanh (x)}{a}-\frac{b \operatorname{Subst}\left (\int \frac{1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{a}\\ &=-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}}+\frac{\tanh (x)}{a}\\ \end{align*}

Mathematica [A]  time = 0.0770049, size = 38, normalized size = 1. \[ \frac{\tanh (x)}{a}-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[x]^2/(a + b*Cosh[x]^2),x]

[Out]

-((b*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/(a^(3/2)*Sqrt[a + b])) + Tanh[x]/a

________________________________________________________________________________________

Maple [B]  time = 0.042, size = 99, normalized size = 2.6 \begin{align*} -{\frac{b}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){a}^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a+b}}}}+{\frac{b}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){a}^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a+b}}}}+2\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)^2/(a+b*cosh(x)^2),x)

[Out]

-1/2/a^(3/2)*b/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2+2*a^(1/2)*tanh(1/2*x)+(a+b)^(1/2))+1/2/a^(3/2)*b/(a+b)
^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2-2*a^(1/2)*tanh(1/2*x)+(a+b)^(1/2))+2/a*tanh(1/2*x)/(tanh(1/2*x)^2+1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(a+b*cosh(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.21949, size = 1277, normalized size = 33.61 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(a+b*cosh(x)^2),x, algorithm="fricas")

[Out]

[1/2*((b*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*sinh(x)^2 + b)*sqrt(a^2 + a*b)*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)
*sinh(x)^3 + b^2*sinh(x)^4 + 2*(2*a*b + b^2)*cosh(x)^2 + 2*(3*b^2*cosh(x)^2 + 2*a*b + b^2)*sinh(x)^2 + 8*a^2 +
 8*a*b + b^2 + 4*(b^2*cosh(x)^3 + (2*a*b + b^2)*cosh(x))*sinh(x) + 4*(b*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*si
nh(x)^2 + 2*a + b)*sqrt(a^2 + a*b))/(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 + 2*(2*a + b)*cosh(x)^2
 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4*(b*cosh(x)^3 + (2*a + b)*cosh(x))*sinh(x) + b)) - 4*a^2 - 4*a*b)/
(a^3 + a^2*b + (a^3 + a^2*b)*cosh(x)^2 + 2*(a^3 + a^2*b)*cosh(x)*sinh(x) + (a^3 + a^2*b)*sinh(x)^2), -((b*cosh
(x)^2 + 2*b*cosh(x)*sinh(x) + b*sinh(x)^2 + b)*sqrt(-a^2 - a*b)*arctan(1/2*(b*cosh(x)^2 + 2*b*cosh(x)*sinh(x)
+ b*sinh(x)^2 + 2*a + b)*sqrt(-a^2 - a*b)/(a^2 + a*b)) + 2*a^2 + 2*a*b)/(a^3 + a^2*b + (a^3 + a^2*b)*cosh(x)^2
 + 2*(a^3 + a^2*b)*cosh(x)*sinh(x) + (a^3 + a^2*b)*sinh(x)^2)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}^{2}{\left (x \right )}}{a + b \cosh ^{2}{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)**2/(a+b*cosh(x)**2),x)

[Out]

Integral(sech(x)**2/(a + b*cosh(x)**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.34357, size = 78, normalized size = 2.05 \begin{align*} -\frac{b \arctan \left (\frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt{-a^{2} - a b}}\right )}{\sqrt{-a^{2} - a b} a} - \frac{2}{a{\left (e^{\left (2 \, x\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(a+b*cosh(x)^2),x, algorithm="giac")

[Out]

-b*arctan(1/2*(b*e^(2*x) + 2*a + b)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*a) - 2/(a*(e^(2*x) + 1))